package com.lude.erp.prototype.model;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import com.lude.erp.common.model.BaseModel;

@Entity(name = "identity_credential")
public class IdentityCredential implements BaseModel
{

	private static final long serialVersionUID = 1L;

	private long credentialId;

	private IdentityCredentialType identityCredentialType;

	private Identity identity;

	private String value;

	private Date createdDate;

	private Date createdDatetime;

	private Date updatedDate;

	private Date updatedDatetime;

	@Id
	@GeneratedValue
	public long getCredentialId()
	{
		return credentialId;
	}

	public void setCredentialId(long credentialId)
	{
		this.credentialId = credentialId;
	}

	@ManyToOne
	@JoinColumn(name = "type_id")
	public IdentityCredentialType getIdentityCredentialType()
	{
		return identityCredentialType;
	}

	public void setIdentityCredentialType(IdentityCredentialType identityCredentialType)
	{
		this.identityCredentialType = identityCredentialType;
	}

	@ManyToOne
	@JoinColumn(name = "identity_id")
	public Identity getIdentity()
	{
		return identity;
	}

	public void setIdentity(Identity identity)
	{
		this.identity = identity;
	}

	public String getValue()
	{
		return value;
	}

	public void setValue(String value)
	{
		this.value = value;
	}

	public Date getCreatedDate()
	{
		return createdDate;
	}

	public void setCreatedDate(Date createdDate)
	{
		this.createdDate = createdDate;
	}

	public Date getCreatedDatetime()
	{
		return createdDatetime;
	}

	public void setCreatedDatetime(Date createdDatetime)
	{
		this.createdDatetime = createdDatetime;
	}

	public Date getUpdatedDate()
	{
		return updatedDate;
	}

	public void setUpdatedDate(Date updatedDate)
	{
		this.updatedDate = updatedDate;
	}

	public Date getUpdatedDatetime()
	{
		return updatedDatetime;
	}

	public void setUpdatedDatetime(Date updatedDatetime)
	{
		this.updatedDatetime = updatedDatetime;
	}

}
